﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using shenghua.Common.CustomValueType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace shenghua.Member.Collection
{
    /// <summary>
    /// 收藏的商品
    /// </summary>
    public class CollectionCommodity: Entity, IHasCreationTime, IExtendableObject
    {
        public long MemberId { get; set; }
        public int CommodityId { get; set; }
        public int? ShoppingOptionId { get; set; }
        public DateTime CreationTime { get; set; }

        public string CommodityName { get; set; }
        public Money CommodityPrice { get; set; }
        public string CommodityPicture { get; set; }
        public Dictionary<string, string> ShoppingOptionParameters
        {
            get
            {
                return this.GetData<Dictionary<string, string>>("parameters");
            }
        }

        public void SetShoppingOptionParameters(Dictionary<string, string> parameters)
        {
            this.SetData("parameters", parameters);
        }

        public string ExtensionData { get; set; }

        public CollectionCommodity()
        {
            SetShoppingOptionParameters(new Dictionary<string, string>());
        }
    }
}
